home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / dfpp01.zip / CONTROL.H < prev    next >
C/C++ Source or Header  |  1992-11-10  |  1KB  |  36 lines

  1. // ---------- control.h
  2.  
  3. #ifndef CONTROL_H
  4. #define CONTROL_H
  5.  
  6. #include "dfwindow.h"
  7.  
  8. class TextBox;
  9.  
  10. class Control : public DFWindow    {
  11.     Bool enabled;       // true if control is enabled
  12. public:
  13.     Control(char *ttl,int lf,int tp,int ht,int wd,DFWindow *par)
  14.                         : DFWindow(ttl, lf, tp, ht, wd, par)
  15.         { OpenControl(); }
  16.     Control(char *ttl, int ht, int wd, DFWindow *par)
  17.                         : DFWindow(ttl, ht, wd, par)
  18.         { OpenControl(); }
  19.     Control(int lf, int tp, int ht, int wd, DFWindow *par)
  20.                         : DFWindow(lf, tp, ht, wd, par)
  21.         { OpenControl(); }
  22.     Control(int ht,int wd,DFWindow *par) : DFWindow(ht,wd,par)
  23.         { OpenControl(); }
  24.     Control(char *ttl)    : DFWindow(ttl)
  25.         { OpenControl(); }
  26.     virtual ~Control() { /* null */ }
  27.     virtual void Keyboard(int key);
  28.     void OpenControl() { Enable(); }
  29.     void Enable()      { enabled = True; }
  30.     void Disable()     { enabled = False; }
  31.     Bool isEnabled()   { return enabled; }
  32. };
  33.  
  34. #endif
  35.  
  36.